<include file="App/Home/View/Public/header.html"/>
<style>
.ui-btn-inline {
	width: 87%;
	margin-top: 2em;
	background-color: rgba(255,255,255,0) !important;
	text-shadow: none;
	border: none;
	box-shadow: none;
	background-color: #ffc703 !important;
	color: #333 !important;
	text-shadow: none !important;
}
.ui-shadow-inset {
	background-color: rgba(255,255,255,0) !important;
	text-shadow: none;
	border: 1px solid #ffc703 !important;
	box-shadow: none;
	background-color: rgba(0,0,0,0.5) !important;
}
</style>
<!-----------------------------主体内容 开始------------------------------>
<div data-role="main" class="ui-content"> 
  <!------登录表单 开始------->

    <form class="w80p btc_tcoin" method="post" onsubmit="return false">
      <div class="ui-field-contain padt_5">
        <label for="address" class="ui-hidden-accessible">{$Think.lang.__BITEBIDIZHI__}</label>
        <input type="text" name="address" id="address" value="{$bit_address}" disabled="disabled"  placeholder="{$Think.lang.__BITEBIDIZHI__}" />
      </div>
      <div class="ui-field-contain padt_5">
        <label for="lk_num" class="ui-hidden-accessible">{$Think.lang.__QINGSHURULUNKASHULIANG__}</label>
        <input type="text" name="lk_num" id="lk_num"  placeholder="{$Think.lang.__QINGSHURULUNKASHULIANG__}" />
      </div>
      <div class="ui-field-contain padt_5">
        <label for="password2" class="ui-hidden-accessible">{$Think.lang.__QINGSHURUJIAOYIMIMA__}</label>
        <input type="password" name="password2" id="password2" placeholder="{$Think.lang.__QINGSHURUJIAOYIMIMA__}">
      </div>
      <div class="ui-field-contain verify " >
        <label for="verify1" class="ui-hidden-accessible">{$Think.lang.__SHOUJIYANZHENGMA__}</label>
        <input type="text" name="verify1" id="verify1"  placeholder="{$Think.lang.__SHOUJIYANZHENGMA__}">
        <button id="btnbtn" data-inline="true" >{$Think.lang.__HUOQUYANZHENGMA__}</button>
      </div>
      <input class="w100p" type="button" onclick="ajaxSubmit();" data-inline="true" value="{$Think.lang.__TIXIAN__}">
    </form>
  <!------登录表单 结束------->

  <!------一键分享介绍 开始------->
  <p>
  <div class="logo1 w80p">
    <div class="pad0_5">
      <p class="textcolor_yellow1"> <span>{$Think.lang.__TIXIAN__}</span> </p>
      <p class="textcolor_yellow1 sizeem8"> <span>{$Think.lang.__TIBINEIRONG__} </span> </p>
    </div>
  </div>
  <!------充币记录链接 开始------>
  <p>
    <div class="w80p">
     <a class="float_r coin_jl" href="{:U('Withdraw/jilu')}" data-ajax="false" >{$Think.lang.__TIXIANJILU__}</a>
    </div>
    <div class="clear"></div>
  </p>
  <!------充币记录链接 结束------>

<!-----------------------------主体内容 结束------------------------------>
<script type="text/javascript">
	$('#btnbtn').click(function(){
		var lk_num = $('#lk_num').val();
		var password2 = $('#password2').val();
		if(lk_num == null){
			layer.msg("{$Think.lang.__QINGSHURULUNKASHULIANG__}");
			return false;
		}
		if(password2 == null){
			layer.msg("{$Think.lang.__QINGSHURUJIAOYIMIMA__}");
			return false;
		}
		//倒计时120秒
		//倒计时120秒
		var i=120;
        var tid2;
       
		$.ajax({
			url:"{:U('Login/sendPhone')}",
			type:"POST",
			data:{type:3},
			dataType:"json",
			success:function (data){
				layer.msg(data.info);
				if(data.status == 1){
					 tid2=setInterval(function(){
		
				  
						$('#btnbtn').attr("disabled",true);
						
						i--;
						$('#btnbtn').html(i+"秒后可重新发送");
						if(i<=0){
							$('#btnbtn').removeAttr("disabled").html("重新发送验证码");
							
							clearInterval(tid2);
						}
				
					},1000);
				}
			}
		})
		
	})
	function ajaxSubmit(){
		var num = $('#lk_num').val();
		var address = $('#address').val();
		var password2 = $('#password2').val();
		var verify = $('#verify1').val();
		if(num == ""){
			layer.msg('请输入提现伦卡数量');
			return false;
		}
		
		if(address == "请先补全比特币地址"){
			layer.msg('请先补全比特币地址');
			return false;
		}
		if(password2 == ""){
			layer.msg('请输入交易密码');
			return false;
		}
		if(verify == ""){
			layer.msg('请输入手机验证码');
			return false;
		}
		$.ajax({
			url:"{:U('Withdraw/withdraw')}",
			type:"POST",
			data:{'lk_num':num,'code':verify,'tradepwd':password2},
			dataType:'json',
			success:function (data){
				layer.msg(data.info);
				if(data.status == 1){
					location.replace(location);
				}
			}
		})
	}
	

</script>

<include file="App/Home/View/Public/footer.html"/>